<?php
    #Include the connect.php file
    include ($_SERVER["DOCUMENT_ROOT"].'/CTAN/models/TietMuc.php');
    $tietmuc = new tietmuc();
    //select: hanh vi mac dinh
    $mabuoidien = $_REQUEST['mabuoidien'];
    //$mabuoidien = 1;
    $result = $tietmuc->danhSachTietMucThuocBuoiDien($mabuoidien);
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
        $danhsachtietmuc[] = array(
            'ma_tiet_muc' => $row['ma_tiet_muc'],
            'ten_tiet_muc' => $row['ten_tiet_muc']
        );
    }
    echo json_encode($danhsachtietmuc, JSON_UNESCAPED_UNICODE);
?>